package com.example.test.fragment;

import com.example.test.BindItemActivity;
import com.example.test.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;

public class BindFragment extends BaseFragment implements OnClickListener {

	@ViewInject(R.id.ly_card)
	private LinearLayout ly_card;
	@ViewInject(R.id.ly_carnumber)
	private LinearLayout ly_carnumber;
	@ViewInject(R.id.ly_incrase)
	private LinearLayout ly_increase;
	private Intent intent;

	@Override
	public void initData() {
		// TODO Auto-generated method stub
		ly_card.setOnClickListener(this);
		ly_carnumber.setOnClickListener(this);
		ly_increase.setOnClickListener(this);
	}

	@Override
	public View initView(LayoutInflater inflater) {
		View view = inflater.inflate(R.layout.bind_layout, null);
		ViewUtils.inject(this, view);
		// TODO Auto-generated method stub
		return view;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.ly_card:
			intent = new Intent(ct, BindItemActivity.class);
			intent.putExtra("title", getString(R.string.bindcard));
			startActivity(intent);
			break;
		case R.id.ly_carnumber:
			intent = new Intent(ct, BindItemActivity.class);
			intent.putExtra("title", getString(R.string.bindcarnumber));
			startActivity(intent);
			break;
		case R.id.ly_incrase:
			intent = new Intent(ct, BindItemActivity.class);
			intent.putExtra("title", getString(R.string.increase));
			startActivity(intent);
			break;

		default:
			break;
		}
	}

}
